/*++++++++++ profile ++++++++++*/
// HashFlow.p4
// Zhao Zongyi, xinshengzzy@foxmail.com, 2020.11.09
/*----------*/
#include "tofino/stateful_alu_blackbox.p4"
#include "tofino/pktgen_headers.p4"
#include <tofino/constants.p4>
#include <tofino/intrinsic_metadata.p4>

#include "includes/headers.p4"
#include "includes/parser.p4"
#include "includes/macro.p4"
#include "includes/registers.p4"
#include "includes/tables.p4"
#include "includes/fieldlists.p4"
#include "includes/metadata.p4"


/*++++++++++ ingress ++++++++++*/
control ingress {
  apply(forward_t);
  if(valid(tcp) and 80 == tcp.srcport) {
  /* if(128 != ig_intr_md_for_tm.ucast_egress_port and 144 != ig_intr_md_for_tm.ucast_egress_port) { */
    apply(count_packet_t);
  }
  /* if(valid(udp) and (68 == udp.srcport or 67 == udp.srcport)) { */
  if(valid(udp)) {
    apply(count_ip_packet_t);
  }
}
/*----------*/

/*++++++++++ egress ++++++++++*/
control egress
{
    // no operation
}
/*----------*/
